<template>
	<view class="content">
		<view class="filter-box">
			<view v-for="item in filterList" class="filter-box-item" :class="item.type" @click="handleClick(item)">
				<view>{{item.name}}</view>
				<view>{{item.number}}个</view>
			</view>
		</view>
		
		<view class="page-container">
			<view v-for="item in list" class="list-item">
				<view class="type-status" :class="item.status==1 ? 'success' : 'fail'"></view>
				<view class="list-item-center">
					<view class="mt20 mb20">测站名称：<text>天津站</text></view>
					<view>实时水位：<text>7m</text></view>
				</view>
				<view class="list-item-right">
					<view class="mt20 mb20">测站编码：<text>A2H3G4H5K</text></view>
					<view>更新时间：2023-02-02 18:00</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: '',
				area: '',
				filterList: [
					{name: '测站总数', number: 304, type: 'total'},
					{name: '正常测站', number: 300, type: 'success'},
					{name: '异常测站', number: 4, type: 'fail'},
				],
				list: [
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 2},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 2},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 2},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1},
					{name: '天津站', updateTime: '2023-02-02 16:21', code: 'A2H3G4H5K', reailTimLevel: '7m', status: 1}
				]
			};
		},
		
		methods: {
			handleClick(e) {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100%;
		padding: 20upx;
	}
	.filter-box {
		display: flex;
		align-items: center;
		justify-content: space-around;
		width: 100%;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 999;
		background: #fff;
		.filter-box-item {
			width: 200upx;
			height: 116upx;
			display: flex;
			align-items: center;
			flex-direction: column;
			justify-content: center;
			color: #fff;
			&.total{
				background: #3D7EFF;
			}
			&.success {
				background: #28B93D;
			}
			&.fail{
				background: #E83A30;
			}
		}
	}
	
	::v-deep .uni-stat__select {
		width: 300upx !important;
		.uni-select__input-box {
			height: 50upx !important;
		}
		.uni-select {
			height: 50upx;
		}
	}
	
	.page-container {
		padding: 10upx;
		box-sizing: border-box;
		padding-top: 120upx;
		.list-item {
			display: flex;
			position: relative;
			padding-left: 30upx;
			box-sizing: border-box;
			height: 140upx;
			border-bottom: 2upx solid #E6E6E6;
		}
		.type-status {
			width: 22upx;
			height: 22upx;
			background: #ddd;
			border-radius: 100%;
			position: absolute;
			left: 0;
			top: 27upx;
			&.success{
				background: #28B93D;
			}
			&.fail {
				background: #BA2E26;
			}
		}
		.list-item-center, .list-item-right {
			display: flex;
			flex-direction: column;
			font-size: 26upx;
		}
		.list-item-center{
			width: 45%;
		}
		
		.list-item-right {
			width: 55%;
		}
		
		.mt20 {
			margin-top: 20upx;
		}
		.mb20 {
			margin-bottom: 20upx;
		}
	}
	
</style>
